﻿using Comm100.Framework.Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bot.Domain.Entities;
using Bot.Domain.Interfaces;
using Bot.Domain.Bo;
using Castle.Windsor;
using Bot.Domain.Specifications;

namespace Bot.Domain.Categories.Service
{
    public class PrebuiltEntityDomainService : IPrebuiltEntityDomainService
    {
        private IWindsorContainer _container;
        private readonly IRepository<Guid, PrebuiltEntity> _repository;

        public PrebuiltEntityDomainService(IRepository<Guid, PrebuiltEntity> repository, IWindsorContainer container)
        {
            this._repository = repository;
            this._container = container;
        }

        public PrebuiltEntity Get(Guid id)
        {
            return _repository.Get(id);
        }

        public IEnumerable<PrebuiltEntity> List(string language)
        {
            return _repository.List(new PrebuiltEntityFilterSpecification(language));
        }
    }
}
